 // 车险集印/打单
<template>

<div class="car-india-single">

    <div class="base-info">
        <div class="orderId">
            <h1>
                订单号: {{baseData.orderId}}
            </h1>
        </div>
        <div class="base-info-content">
            <c-common-form :mods='baseMods' :data='baseData' ></c-common-form>
        </div>
    </div>

 
    <div class="singles">
        
        <Row :gutter='10'>
            <Col :span='singleMod.span' v-for='(singleMod, type) of singleMods' :key='type'>

                <div class="singleMod-header">
                   <c-block-header :title='singleMod.title'></c-block-header>
                </div>

                <div class="singleMod-content">
                    <Row>
                        <Col class='item' :span='mod.span' v-for='(mod, index) of singleMod.mods' :key='mod.index'>
                            <l-single-item :singleStatus='singles[mod.key].status' :mod='mod' :singleNumber='singles[mod.key].serialNumber' :btnsConf='mod.btnsConf'></l-single-item>
                        </Col>
                    </Row>
                </div>
                
            </Col>
        </Row>
        
    </div>
    
    
</div>

</template>

<script lang='ts'>
import {Component, Prop, Watch, Vue} from 'vue-property-decorator'
import { deepCopy } from '@/utils/tools'
import parckComponents from '@/components/ivew_components/parck_components/index'
import {store} from '@/store/index'
import singleItem from './single_item/index.vue'
import {baseMods, bulidConf } from './conf'

 
@Component({
    components: {
        'l-single-item': singleItem
    }
})
export default class carIndia extends Vue{
    name:string = 'car-india'

    orderStatus:string = 'payCach'

    // 获取初始数据及基本配置
    created (){
        this.orderStatus = store.state['carFormStore']['orderData']['Sstatus'];
        store.dispatch('request', {
            url: 'get/printList',
            data: {}
        })
        
    }
    
    // 订单基础信息
    get baseData ():formInf.indiaOrderInfo{
        return store.state['carFormStore']['indiaOrderInfo']
    }

    // 已集印列表
    get singles (){
        return store.state['carFormStore']['indiaSingle']
    }
    
    // 组件配置
    get singleMods():formInf.singleModConf{
        return bulidConf(this.orderStatus)
    }

    baseMods = baseMods

}


</script>

<style scoped lang='scss'>

.base-info{
    
    margin-bottom: _intervals();

    .orderId{
        margin-bottom: _intervals(2);
        padding: _rem(4px) _rem(10px);
        border-radius: $border_radius;
        background: $main_color;
        color: $font_light_color;

        h1{
            font-weight: 600;
            font-size: $font_md;
        }
    }

    .base-info-content{
        padding: 0 _intervals(2);
    }

}

.singles{   

}

.singleMod-header{

}

.singleMod-content{

    
}

</style>